<template>
  <view class="disFlx">
    <view class="flex-shrink-0 mr-8">
      <TImage
        src="https://hb-saas.obs.cn-south-1.myhuaweicloud.com/mall/saas/answer-icon.png"
        width="40rpx"
        height="40rpx"
      />
    </view>
    <view class="flex-1">
      <!-- <view class="color1 fz-14 mb-8 disFlxAC">
        <text>何思颖</text>
        <text class="mx-4 publisher-tag fz-10 px-6 py-2 br-2">发布者</text>
        <text class="ali-icon fz-12 color1 mr-4">&#xe606;</text>
        <text>张三</text>
      </view> -->
      <view class="fz-14 default-color mb-8" style="word-break: break-all">
        <text>{{ replyContent }}</text>
      </view>
      <view v-if="replyTime" class="fz-14 color1">
        <text>{{ dateUtil().to(replyTime) }}</text>
      </view>
    </view>
  </view>
</template>

<script setup lang="ts">
  import TImage from '@/components/TImage/index.vue';
  import { dateUtil } from '@/utils/dateUtil';
  import { propTypes } from '@/utils/propTypes';

  defineProps({
    /** 回答内容 */
    replyContent: propTypes.string.def(''),
    /** 回答时间 */
    replyTime: propTypes.string.def(''),
  });
</script>

<style lang="scss" scoped>
  .color1 {
    color: #969799;
  }

  .publisher-tag {
    background-color: #2878ff;
    color: #fff;
  }
</style>
